import React, { Component } from "react";

class Login extends Component {
  login = () => {
    console.log(this.props);
    const { push, replace } = this.props.history;
    localStorage.setItem("hm_token", Math.random().toString(12));
    push("/home");
    // replace("/home");
  };
  render() {
    return (
      <div>
        <button onClick={this.login}>登录</button>
      </div>
    );
  }
}

export default Login;
